<template>
  <div class="container">
    <div class="image">
      
    </div>
    <div class="header">
      <img src="../src/assets/images/logo.png" alt="">
      <h1 class="title">cocoreimu-ui 组件展示</h1>
    </div>
  </div>
    <div class="main">
      <div class="left-menu">
        <nav class="nav">
          <ul>
            <li v-for="(item,index) in componentsList" :key="index">
              <RouterLink :to="'/' + item.toLowerCase()">{{ item }}</RouterLink>
            </li>
          </ul>
        </nav>
      </div>
      <div class="displayArea">
        <RouterView></RouterView>
      </div>
    </div>
</template>

<script setup lang='ts'>
let componentsList = [
  "Icon",
  "Button",
  "Countdown",
  "LcHeader",
  "menuh",
  "Input"
]
</script>

<style scoped lang="scss">
img{
  height: 4rem;
}

.header {
  width: 100%;
  color: #409eff;
}

.main {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  padding-top: 3rem;
}

.left-menu {
  margin: 2rem;
  margin-top: 1rem;
  margin-left: 5rem;
  padding-right: 1rem;
  padding-left: 1rem;
  overflow: hidden;
  &:hover {
    overflow-y: auto;
  }

  &::-webkit-scrollbar-button {
    //滚动条两端按键
    display: none; //不显示
  }

  &::-webkit-scrollbar {
    //滚动条整体部分
    width: 0.5rem; //设置宽度
  }

  &::-webkit-scrollbar-thumb {
    //滚动条里面小方块
    background: #dcdbdb;
    border-radius: 4rem;
  }

  &:active::-webkit-scrollbar-thumb {
    background: #a09f9f;
  }
}

li {
  margin-bottom: 1rem;
  width: 8rem;
  padding-top: 1.5rem;
}

.nav :hover {
  color: #409eff;
}

h1.title {
  text-align: center;
  font-weight: 900;
  font-size: 2.2rem;
}

.nav {
  height: auto;
  justify-content: space-evenly;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: #a2a2a2;
}

.displayArea {
  width: 100%;
  margin-right: 5rem;
  margin-top: 1rem;
  margin-left: 2rem;
  padding: 2rem;
  overflow: hidden;
  border: 1px solid #409eff;
  &:hover {
    overflow-y: auto;
  }

  &::-webkit-scrollbar-button {
    //滚动条两端按键
    display: none; //不显示
  }

  &::-webkit-scrollbar {
    //滚动条整体部分
    
    width: 0.5rem; //设置宽度
  }

  &::-webkit-scrollbar-thumb {
    //滚动条里面小方块
    background: #dcdbdb;
    border-radius: 4rem;
  }

  &:active::-webkit-scrollbar-thumb {
    background: #a09f9f;
  }
}
</style>